package com.siwei.mes.entity.erp;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;


/**
 * (Contract)实体类
 *
 * @author linzi
 * @since 2024-08-14 22:11:29
 */
@Data
@Accessors(chain = true)
@Table(name = "contract")
@ApiModel(value = "Contract", description = "")
public class Contract implements Serializable {
    private static final long serialVersionUID = 838710152960209820L;
    /**
     * 合同id
     */
    @Column(name = "CID")
    @ApiModelProperty(value = "合同id", name = "cid")
    private Integer cid;
    /**
     * 客户id
     */
    @Column(name = "CUSID")
    @ApiModelProperty(value = "客户id", name = "cusid")
    private Integer cusid;
    /**
     * 客户名称
     */
    @Column(name = "customerName")
    @ApiModelProperty(value = "客户名称", name = "customername")
    private String customername;
    /**
     * 合同编号
     */
    @Column(name = "contractNo")
    @ApiModelProperty(value = "合同编号", name = "contractno")
    private String contractno;
    /**
     * 信用等级
     */
    @Column(name = "level")
    @ApiModelProperty(value = "信用等级", name = "level")
    private String level;
    /**
     * 类型 1 普通合同 2电子合同
     */
    @Column(name = "type")
    @ApiModelProperty(value = "类型 1 普通合同 2电子合同", name = "type")
    private Integer type;
    /**
     * 1-正式合同 3-临时合同 4-垫资合同 5-月结合同 6-现金合同 7-关系合同
     */
    @Column(name = "subType")
    @ApiModelProperty(value = "1-正式合同 3-临时合同 4-垫资合同 5-月结合同 6-现金合同 7-关系合同", name = "subtype")
    private Integer subtype;
    /**
     * 授信金额
     */
    @Column(name = "creditAmount")
    @ApiModelProperty(value = "授信金额", name = "creditamount")
    private Long creditamount;
    /**
     * 销售金额
     */
    @Column(name = "salesAmount")
    @ApiModelProperty(value = "销售金额", name = "salesamount")
    private Long salesamount;
    /**
     * 结算金额
     */
    @Column(name = "settlementAmout")
    @ApiModelProperty(value = "结算金额", name = "settlementamout")
    private Long settlementamout;
    /**
     * 授信方量
     */
    @Column(name = "creditQuantity")
    @ApiModelProperty(value = "授信方量", name = "creditquantity")
    private Float creditquantity;
    /**
     * 供货单位
     */
    @Column(name = "deliverCompanyName")
    @ApiModelProperty(value = "供货单位", name = "delivercompanyname")
    private String delivercompanyname;
    @Column(name = "tpz")
    @ApiModelProperty(value = "${column.comment}", name = "tpz")
    private String tpz;
    /**
     * 签订日期
     */
    @Column(name = "signDate")
    @ApiModelProperty(value = "签订日期", name = "signdate")
    private Date signdate;
    /**
     * 下单开始时间1400
     */
    @Column(name = "orderStartTime")
    @ApiModelProperty(value = "下单开始时间1400", name = "orderstarttime")
    private String orderstarttime;
    /**
     * 下单结束时间2100
     */
    @Column(name = "orderEndTime")
    @ApiModelProperty(value = "下单结束时间2100", name = "orderendtime")
    private String orderendtime;
    @Column(name = "searchKey")
    @ApiModelProperty(value = "${column.comment}", name = "searchkey")
    private String searchkey;
    @Column(name = "extraInfo")
    @ApiModelProperty(value = "${column.comment}", name = "extrainfo")
    private String extrainfo;
    /**
     * 合同联系人
     */
    @Column(name = "linkMan")
    @ApiModelProperty(value = "合同联系人", name = "linkman")
    private String linkman;
    /**
     * 合同联系电话
     */
    @Column(name = "linkTel")
    @ApiModelProperty(value = "合同联系电话", name = "linktel")
    private String linktel;
    /**
     * 合同照片
     */
    @Column(name = "imgs")
    @ApiModelProperty(value = "合同照片", name = "imgs")
    private String imgs;
    /**
     * 合同生效日期
     */
    @Column(name = "startDate")
    @ApiModelProperty(value = "合同生效日期", name = "startdate")
    private Date startdate;
    /**
     * 合同结束日期
     */
    @Column(name = "endDate")
    @ApiModelProperty(value = "合同结束日期", name = "enddate")
    private Date enddate;
    @Column(name = "THTCID")
    @ApiModelProperty(value = "${column.comment}", name = "thtcid")
    private Integer thtcid;
    @Column(name = "state")
    @ApiModelProperty(value = "${column.comment}", name = "state")
    private Integer state;
    @Column(name = "createTime")
    @ApiModelProperty(value = "${column.comment}", name = "createtime")
    private Date createtime;
    @Column(name = "updateTime")
    @ApiModelProperty(value = "${column.comment}", name = "updatetime")
    private Date updatetime;
    /**
     * 结算状态 1-未结算 2-已结算
     */
    @Column(name = "accountStatus")
    @ApiModelProperty(value = "结算状态 1-未结算 2-已结算", name = "accountstatus")
    private Integer accountstatus;
    /**
     * 销售商
     */
    @Column(name = "seller")
    @ApiModelProperty(value = "销售商", name = "seller")
    private String seller;

    @Column(name = "secondNo")
    @ApiModelProperty(value = "合同编号2")
    private String secondNo;

    @Transient
    @ApiModelProperty(value = "任务单号")
    private Integer frwd;

    @Transient
    @ApiModelProperty(value = "ERP合同扩展信息")
    private ContractExtraInfo contractExtraInfo;
}
